package com.hq.door.dto;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import org.aspectj.weaver.patterns.ThisOrTargetAnnotationPointcut;

import com.hq.door.pojo.TInstitute;
import com.hq.door.pojo.TMajor;

public class InstituteInfo {
	String institutename;
	List<MajorInfo> majorInfos;
	
	public InstituteInfo() {
		majorInfos = new ArrayList<MajorInfo>();
	}
	public String getInstitutename() {
		return institutename;
	}
	public void setInstitutename(String institutename) {
		this.institutename = institutename;
	}
	public List<MajorInfo> getMajorInfos() {
		return majorInfos;
	}
	public void setMajorInfos(List<MajorInfo> majorInfos) {
		this.majorInfos = majorInfos;
	}
	public InstituteInfo getIns(TInstitute tInstitute){
		this.institutename = tInstitute.getName();
		for(TMajor tMajor : tInstitute.getTMajors()){
			MajorInfo majorInfo = new MajorInfo();
			this.majorInfos.add(majorInfo.getIns(tMajor));
		}
		return this;
	}
}
